﻿@model WidgetViewModel
@if (Model != null)
{ 
<li class="widget-li">
    <div class="widget" id="@Model.Id"> 
        @if (User.IsAdmin())
        { 
        <div class="widget_admin"> 
            @if (Model.IsEditable)
            {             
                @Html.ActionLink(Strings.Edit, "Edit", "Widget", new { id = Model.Id }, new { @class = "widget_edit" })		
            } 
            <a class="widget_delete" href="#">X</a> 
	    </div>
        } 
        <div class="widget_title"> 
		    @Model.Title
	    </div>
        <div class="widget_content"> 
	        @Model.Content	            
            @Html.Partial(Model.ViewName, Model.ViewData)
        </div>    
    </div> 
</li>
} 
